import request from '@/utils/request'

// -------------------------------------------------------------------------------------设备验收接口文档----------------------------------------------------------------------------

// 获取设备验收列表---------------------------------------- 
export function list (params) {
  return request({
    url: '/function/acceptance/list',
    method: 'get',
    params
  })
}


// 获取设备验收编号列表详情 ==> 三个页面全部通用 ----------------------------------------
export function listDetail (id) {
  return request({
    url: '/function/acceptance/' + id,
    method: 'get',
  })
}


// -------------------------------------------------------------------------------------与我相关接口文档----------------------------------------------------------------------------

// 获取与我相关列表----------------------------------------
export function relatedtomeList (params) {
  return request({
    url: '/function/acceptance/my/list',
    method: 'get',
    params
  })
}

// 新增：采购单号接口--------------------------------------
export function relatedtomePurchaseList (params) {
  return request({
    url: '/function/purchase/acceptance/list',
    method: 'get',
    params
  })
}

//新增： 提交接口----------------------------------------
export function add (data) {
  return request({
    url: '/function/acceptance',
    method: 'post',
    data
  })
}

// 立即验收  详情接口---------------------------------------
export function ImmediateDetail (id) {
  return request({
    url: '/function/acceptance/part/' + id,
    method: 'get',
  })
}

// 立即验收  修改接口---------------------------------------
export function ImmediateDetailPut (data) {
  return request({
    url: '/function/acceptance',
    method: 'put',
    data
  })
}

// -------------------------------------------------------------------------------------验收标准接口文档----------------------------------------------------------------------------

// 验收标准列表----------------------------------------
export function standardList (params) {
  return request({
    url: '/function/acceptanceLevel/list',
    method: 'get',
    params
  })
}
// 修改验收标准列表状态，启用，禁用----------------------------------------
export function standardStatus (data) {
  return request({
    url: '/function/acceptanceLevel/changeStatus',
    method: 'put',
    data
  })
}

// 提交：获取列表详情----------------------------------------
export function standardDetail (id) {
  return request({
    url: '/function/acceptanceLevel/' + id,
    method: 'get',
  })
}

// 提交：添加验收标准-----------------------------------------------
export function standardAdd (data) {
  return request({
    url: '/function/acceptanceLevel',
    method: 'post',
    data
  })
}

// 提交：修改验收标准-----------------------------------------------
export function standardUpdate (data) {
  return request({
    url: '/function/acceptanceLevel',
    method: 'put',
    data
  })
}